﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectFGWAT.aspx.cs" Inherits="Honestysoft.Financing.WebUI.Module.Audit.SelectFGWAT" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>选择作业表</title>
    <base target="_self" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link href="../../Styles/skin.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/control.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    body {
	    margin-left: 0px;
	    margin-top: 0px;
	    margin-right: 0px;
	    margin-bottom: 0px;
	    background-color: #EEF2FB;
    }
    </style>
    <script language="javascript" type="text/javascript" src="../../Scripts/table.js"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/control.js"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/jquery-1.4.1.js"></script>
    <script language="javascript" type="text/javascript">
        function checkSelect() {
            var elm = document.getElementsByName("chkID");
            if (elm != null) {
                for (i = 0; i < elm.length; i++) {
                    if (elm[i].checked) {                        
                        return true;
                    }
                }
            }
            alert("请选择作业表后再执行此操作！");
            return false;
        }
        if (window.returnValue == null) {window.returnValue = "";}
    </script>
</head>
<body style="overflow:hidden;margin:2px;background-color:White">
    <form id="form1" runat="server">
    <asp:HiddenField runat="server" ID="hidSelected" />
    <div class="query_area">
    <span style="color:Red">请选择需要的作业表后点击确定按钮。</span>
        <asp:Button runat="server" ID="btnOK" Text="确 定"  class="btn_normal"  onmouseover="this.className='btn_active'" 
                onmouseout="this.className='btn_normal'" OnClientClick="return checkSelect()" onclick="btnOK_Click" />&nbsp;&nbsp;
         <asp:Button runat="server" ID="btnCancel" Text="取 消" class="btn_normal"  onmouseover="this.className='btn_active'" 
                onmouseout="this.className='btn_normal'" OnClientClick="window.returnValue='';window.close();" />
    </div>

    <div style="overflow:scroll;height:520px;width:100%">

    <table cellpadding="0" width="100%" cellspacing="0" border="1" class="t1" id="tGrid">
		<thead>  
            <th align="center" width="30px">
                <input type="checkbox" name="chkAll" value="checkbox" onclick='javascript:checkAll(this,"chkID")' />
            </th>            
            <th align="center" width="110px" style="display:none">ID</th>
            <th align="center" width="110px">审核作业表编号</th>
            <th align="center" width="150px" style="display:none">项目名称</th>
            <th align="center" width="150px" style="display:none">建设单位</th>            
            <th align="center" width="150px" style="display:none">项目项下合同</th>
            <th align="center" width="150px" style="display:none">施工\监理单位</th>
            <th align="center" width="100px">请款金额（元）A</th>
            <th align="center" width="100px">初审金额（元）B</th>            
            <th align="center" width="100px">本合同前期累计拨款金额（元）C</th>
            <th align="center" width="100px">本合同总价金额（元）D</th>
            <th align="center" width="100px">申请付款比例(A+C)/D*100%</th>
            <th align="center" width="100px">实际付款比例(B+C)/D*100%</th>
      	</thead>           
		<asp:Repeater runat="server" ID="rptList">
			<ItemTemplate>
				<tr>
					<td align="center" >
						<input type="checkbox" name="chkID" id="chk<%# DataBinder.Eval(Container.DataItem,"ID") %>"  value="<%# DataBinder.Eval(Container.DataItem,"ID") %>" >
					</td>
                    <td style="display:none"><%#  DataBinder.Eval(Container.DataItem,"ID") %></td>
					<td style="text-align:left"><a href="AuditTable_Edit.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID") %>&FunctionID=<%=Request["FunctionID"] %>" target="_blank" title='项目名称：<%#DataBinder.Eval(Container.DataItem, "ProjectName")%>&#13;建设单位：<%#  DataBinder.Eval(Container.DataItem, "OwnerName")%>&#13;项目项下合同：<%#  DataBinder.Eval(Container.DataItem, "ContractName")%>&#13;施工\监理单位：<%#  DataBinder.Eval(Container.DataItem, "ContractorName")%>'><%#  DataBinder.Eval(Container.DataItem,"Code") %></a></td>
                    <td style="text-align:left;display:none"><%#DataBinder.Eval(Container.DataItem, "ProjectName")%></td>
                    <td style="text-align:left;display:none"><%#  DataBinder.Eval(Container.DataItem, "OwnerName")%></td>
                    <td style="text-align:left;display:none"><%#  DataBinder.Eval(Container.DataItem, "ContractName")%></td>
                    <td style="text-align:left;display:none"><%#  DataBinder.Eval(Container.DataItem, "ContractorName")%></td>
                    <td style="text-align:right"><%# string.Format("{0:N}", DataBinder.Eval(Container.DataItem, "Amount_DocRec_S"))%></td>
                    <td style="text-align:right"><%# string.Format("{0:N}", DataBinder.Eval(Container.DataItem, "Amount_S"))%></td>
                    <td style="text-align:right"><%# string.Format("{0:N}",  DataBinder.Eval(Container.DataItem, "TAmount_C_A_S"))%></td>
                    <td style="text-align:right"><%# string.Format("{0:N}",  DataBinder.Eval(Container.DataItem, "Amount_C_S"))%></td>
                    <td>
						<%# GetPDocRec(Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Amount_DocRec_S")), Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "TAmount_C_A_S")), Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Amount_C_S")))%>
					</td>
                    <td>
						<%# GetPS(Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Amount_S")), Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "TAmount_C_A_S")), Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "Amount_C_S")))%>
					</td>
				</tr>  
			</ItemTemplate>
		</asp:Repeater>
    </table>
    </div>
     <script language="javascript" type="text/javascript">
         uniteTable(tGrid, 5);
   </script>
    </form>
</body>
</html>
